package cn.com.header.core.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 * @author xsw
 * @ClassName: HtmlToPdfInterceptor
 * @Description: TODO()
 * @date 2016-12-8 上午10:17:33
 */

public class HtmlToPdfInterceptor extends Thread {
    private InputStream is;

    public HtmlToPdfInterceptor(InputStream is) {
        this.is = is;
    }

    public void run() {
        try {
            InputStreamReader isr = new InputStreamReader(is, "utf-8");
            BufferedReader br = new BufferedReader(isr);
            String line = null;
            while ((line = br.readLine()) != null) {
                System.out.println(line.toString() + "hah"); //输出内容
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}